package com.whut.gkd.dao;

import com.whut.gkd.bean.Good;
import com.whut.gkd.bean.ShopInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IGoodDao {
    int getTotalCount(@Param("goodName")String goodName, @Param("shopId")int shopId);

    List<Good> findAll(@Param("start") int start, @Param("size")int size, @Param("goodName") String goodName, @Param("shopId") int shopId);

    Good selectGoodById(@Param("goodId")int goodId, @Param("shopId")int shopId);

    void deleteById(@Param("goodId")int goodId, @Param("shopId")int shopId);

    void update(@Param("goodId")int goodId, @Param("goodName")String goodName, @Param("goodNum")int goodNum, @Param("goodPrice")double goodPrice, @Param("goodDescription")String goodDescription, @Param("shopId")int shopId);

    void deleteGoodsByShopId(ShopInfo shopinfo);

}
